//
//  Bool+Category .swift
//  zob
//
//  Created by A-Jay on 11/4/2017.
//  Copyright © 2017年 A-Jay. All rights reserved.
//

import Foundation

/**
 *  关于字符串
 */
extension Bool {
    
    
    /**
     *  正则验证
     */
    static func regex(regex: String, evaluate: String) -> Bool {
        let phonePredicate = NSPredicate(format: "SELF MATCHES %@", regex)
        let phoneBool = phonePredicate.evaluate(with: evaluate)
        return phoneBool
    }
    
}
